Hamiltonian (control Theory)
   HOME

TheInfoList



OR:

The Hamiltonian is a
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
used to solve a problem of
optimal control Optimal control theory is a branch of mathematical optimization that deals with finding a control for a dynamical system over a period of time such that an objective function is optimized. It has numerous applications in science, engineering and ...
for a
dynamical system In mathematics, a dynamical system is a system in which a Function (mathematics), function describes the time dependence of a Point (geometry), point in an ambient space. Examples include the mathematical models that describe the swinging of a ...
. It can be understood as an instantaneous increment of the Lagrangian expression of the problem that is to be optimized over a certain time period. Inspired by, but distinct from, the Hamiltonian of classical mechanics, the Hamiltonian of optimal control theory was developed by
Lev Pontryagin Lev Semenovich Pontryagin (russian: Лев Семёнович Понтрягин, also written Pontriagin or Pontrjagin) (3 September 1908 – 3 May 1988) was a Soviet mathematician. He was born in Moscow and lost his eyesight completely due ...
as part of his
maximum principle In the mathematical fields of partial differential equations and geometric analysis, the maximum principle is any of a collection of results and techniques of fundamental importance in the study of elliptic and parabolic differential equations. ...
. Pontryagin proved that a necessary condition for solving the optimal control problem is that the control should be chosen so as to optimize the Hamiltonian.


Problem statement and definition of the Hamiltonian

Consider a
dynamical system In mathematics, a dynamical system is a system in which a Function (mathematics), function describes the time dependence of a Point (geometry), point in an ambient space. Examples include the mathematical models that describe the swinging of a ...
of n first-order
differential equation In mathematics, a differential equation is an equation that relates one or more unknown functions and their derivatives. In applications, the functions generally represent physical quantities, the derivatives represent their rates of change, an ...
s :\dot(t) = \mathbf(\mathbf(t),\mathbf(t),t) where \mathbf(t) = \left x_(t), x_(t), \ldots, x_(t) \right denotes a vector of state variables, and \mathbf(t) = \left u_(t), u_(t), \ldots, u_(t) \right a vector of control variables. Once initial conditions \mathbf(t_) = \mathbf_ and controls \mathbf(t) are specified, a solution to the differential equations, called a ''trajectory'' \mathbf(t; \mathbf_, t_), can be found. The problem of optimal control is to choose \mathbf(t) (from some set \mathcal \subseteq \mathbb^) so that \mathbf(t) maximizes or minimizes a certain
objective function In mathematical optimization and decision theory, a loss function or cost function (sometimes also called an error function) is a function that maps an event or values of one or more variables onto a real number intuitively representing some "cos ...
between an initial time t = t_ and a terminal time t = t_ (where t_ may be
infinity Infinity is that which is boundless, endless, or larger than any natural number. It is often denoted by the infinity symbol . Since the time of the ancient Greeks, the philosophical nature of infinity was the subject of many discussions amo ...
). Specifically, the goal is to optimize a performance index I(\mathbf(t),\mathbf(t),t) at each point in time, :\max_ J = \int_^ I(\mathbf(t),\mathbf(t),t) \, \mathrmt subject to the above equations of motion of the state variables. The solution method involves defining an ancillary function known as the control Hamiltonian which combines the objective function and the state equations much like a
Lagrangian Lagrangian may refer to: Mathematics * Lagrangian function, used to solve constrained minimization problems in optimization theory; see Lagrange multiplier ** Lagrangian relaxation, the method of approximating a difficult constrained problem with ...
in a static optimization problem, only that the multipliers \mathbf(t), referred to as ''costate variables'', are functions of time rather than constants. The goal is to find an optimal control policy function \mathbf^\ast(t) and, with it, an optimal trajectory of the state variable \mathbf^\ast(t), which by
Pontryagin's maximum principle Pontryagin's maximum principle is used in optimal control theory to find the best possible control for taking a dynamical system from one state to another, especially in the presence of constraints for the state or input controls. It states that it ...
are the arguments that maximize the Hamiltonian, :H(\mathbf^\ast(t),\mathbf^\ast(t),\mathbf(t),t) \geq H(\mathbf(t),\mathbf(t),\mathbf(t),t) for all \mathbf(t) \in \mathcal The first-order necessary conditions for a maximum are given by :\frac = 0 which is the maximum principle, :\frac = \dot which generates the state transition function \mathbf(\mathbf(t),\mathbf(t),t) = \dot, :\frac = - \dot(t) which generates \dot(t) = - \left I_(\mathbf(t),\mathbf(t),t) + \mathbf^(t) \mathbf_(\mathbf(t),\mathbf(t),t) \right/math> the latter of which are referred to as the
costate equation The costate equation is related to the state equation used in optimal control. It is also referred to as auxiliary, adjoint, influence, or multiplier equation. It is stated as a vector of first order differential equations : \dot^(t)=-\frac where ...
s. Together, the state and costate equations describe the Hamiltonian dynamical system (again analogous to but distinct from the
Hamiltonian system A Hamiltonian system is a dynamical system governed by Hamilton's equations. In physics, this dynamical system describes the evolution of a physical system such as a planetary system or an electron in an electromagnetic field. These systems can b ...
in physics), the solution of which involves a two-point
boundary value problem In mathematics, in the field of differential equations, a boundary value problem is a differential equation together with a set of additional constraints, called the boundary conditions. A solution to a boundary value problem is a solution to t ...
, given that there are 2n boundary conditions involving two different points in time, the initial time (the n differential equations for the state variables), and the terminal time (the n differential equations for the costate variables; unless a final function is specified, the boundary conditions are \mathbf(t_) = 0, or \lim_ \mathbf(t_) = 0 for infinite time horizons). A sufficient condition for a maximum is the concavity of the Hamiltonian evaluated at the solution, i.e. :H_(\mathbf^\ast(t),\mathbf^\ast(t),\mathbf(t),t) \leq 0 where \mathbf^\ast(t) is the optimal control, and \mathbf^\ast(t) is resulting optimal trajectory for the state variable. Alternatively, by a result due to Olvi L. Mangasarian, the necessary conditions are sufficient if the functions I(\mathbf(t),\mathbf(t),t) and \mathbf(\mathbf(t),\mathbf(t),t) are both concave in \mathbf(t) and \mathbf(t).


Derivation from the Lagrangian

A
constrained optimization In mathematical optimization, constrained optimization (in some contexts called constraint optimization) is the process of optimizing an objective function with respect to some variables in the presence of constraints on those variables. The obj ...
problem as the one stated above usually suggests a Lagrangian expression, specifically :L = \int_^ I(\mathbf(t),\mathbf(t),t) + \mathbf^(t) \left \mathbf(\mathbf(t),\mathbf(t),t) - \dot(t) \right\, \mathrmt where the \mathbf(t) compare to the
Lagrange multiplier In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
in a static optimization problem but are now, as noted above, a function of time. In order to eliminate \dot(t), the last term on the right-hand side can be rewritten using
integration by parts In calculus, and more generally in mathematical analysis, integration by parts or partial integration is a process that finds the integral of a product of functions in terms of the integral of the product of their derivative and antiderivative. ...
, such that :- \int_^ \mathbf^(t) \dot(t) \, \mathrmt = -\mathbf^(t_) \mathbf(t_) + \mathbf^(t_) \mathbf(t_) + \int_^ \dot^(t) \mathbf(t) \, \mathrmt which can be substituted back into the Lagrangian expression to give :L = \int_^ \left I(\mathbf(t),\mathbf(t),t) + \mathbf^(t) \mathbf(\mathbf(t),\mathbf(t),t) + \dot^(t) \mathbf(t) \right\, \mathrmt - \mathbf^(t_) \mathbf(t_) + \mathbf^(t_) \mathbf(t_) To derive the first-order conditions for an optimum, assume that the solution has been found and the Lagrangian is maximized. Then any perturbation to \mathbf(t) or \mathbf(t) must cause the value of the Lagrangian to decline. Specifically, the
total derivative In mathematics, the total derivative of a function at a point is the best linear approximation near this point of the function with respect to its arguments. Unlike partial derivatives, the total derivative approximates the function with resp ...
of L obeys :\mathrmL = \int_^ \left[ \left( I_(\mathbf(t),\mathbf(t),t) + \mathbf^(t) \mathbf_(\mathbf(t),\mathbf(t),t) \right) \mathrm\mathbf(t) + \left( I_(\mathbf(t),\mathbf(t),t) + \mathbf^(t) \mathbf_(\mathbf(t),\mathbf(t),t) + \dot(t) \right) \mathrm\mathbf(t) \right] \mathrmt - \mathbf^(t_) \mathrm\mathbf(t_) + \mathbf^(t_) \mathrm\mathbf(t_) \leq 0 For this expression to equal zero necessitates the following optimality conditions: :\begin I_(\mathbf(t),\mathbf(t),t) + \mathbf^(t) \mathbf_(\mathbf(t),\mathbf(t),t) &= 0 \\ I_(\mathbf(t),\mathbf(t),t) + \mathbf^(t) \mathbf_(\mathbf(t),\mathbf(t),t) + \dot(t) &= 0 \end If both the initial value \mathbf(t_) and terminal value \mathbf(t_) are fixed, i.e. \mathrm\mathbf(t_) = \mathrm\mathbf(t_) = 0, no conditions on \mathbf(t_) and \mathbf(t_) are needed. If the terminal value is free, as is often the case, the additional condition \mathbf(t_) = 0 is necessary for optimality. The latter is called a transversality condition for a fixed horizon problem. It can be seen that the necessary conditions are identical to the ones stated above for the Hamiltonian. Thus the Hamiltonian can be understood as a device to generate the first-order necessary conditions.


The Hamiltonian in discrete time

When the problem is formulated in discrete time, the Hamiltonian is defined as: : H(x_,u_,\lambda_,t)=\lambda^\top_f(x_,u_,t)+I(x_,u_,t) \, and the
costate equations The costate equation is related to the state equation used in optimal control. It is also referred to as auxiliary, adjoint, influence, or multiplier equation. It is stated as a vector of first order differential equations : \dot^(t)=-\frac where ...
are : \lambda_^\top=-\frac + \lambda_^\top (Note that the discrete time Hamiltonian at time t involves the costate variable at time t+1. This small detail is essential so that when we differentiate with respect to x we get a term involving \lambda(t+1) on the right hand side of the costate equations. Using a wrong convention here can lead to incorrect results, i.e. a costate equation which is not a backwards difference equation).


Behavior of the Hamiltonian over time

From Pontryagin's maximum principle, special conditions for the Hamiltonian can be derived. When the final time t_1 is fixed and the Hamiltonian does not depend explicitly on time \left(\tfrac = 0\right), then: :H(x^*(t),u^*(t),\lambda^*(t)) = \mathrm\, or if the terminal time is free, then: :H(x^*(t),u^*(t),\lambda^*(t)) = 0.\, Further, if the terminal time tends to
infinity Infinity is that which is boundless, endless, or larger than any natural number. It is often denoted by the infinity symbol . Since the time of the ancient Greeks, the philosophical nature of infinity was the subject of many discussions amo ...
, a transversality condition on the Hamiltonian applies. :\lim_ H(t) = 0


The Hamiltonian of control compared to the Hamiltonian of mechanics

William Rowan Hamilton Sir William Rowan Hamilton Doctor of Law, LL.D, Doctor of Civil Law, DCL, Royal Irish Academy, MRIA, Royal Astronomical Society#Fellow, FRAS (3/4 August 1805 – 2 September 1865) was an Irish mathematician, astronomer, and physicist. He was the ...
defined the
Hamiltonian Hamiltonian may refer to: * Hamiltonian mechanics, a function that represents the total energy of a system * Hamiltonian (quantum mechanics), an operator corresponding to the total energy of that system ** Dyall Hamiltonian, a modified Hamiltonian ...
for describing the mechanics of a system. It is a function of three variables: :\mathcal = \mathcal(p,q,t) = \langle p,\dot \rangle -L(q,\dot,t) where L is the
Lagrangian Lagrangian may refer to: Mathematics * Lagrangian function, used to solve constrained minimization problems in optimization theory; see Lagrange multiplier ** Lagrangian relaxation, the method of approximating a difficult constrained problem with ...
, the extremizing of which determines the dynamics (''not'' the Lagrangian defined above), q is the state variable and \dot is its time derivative. p is the so-called "
conjugate momentum In mathematics and classical mechanics, canonical coordinates are sets of coordinates on phase space which can be used to describe a physical system at any given point in time. Canonical coordinates are used in the Hamiltonian formulation of cla ...
", defined by :p = \frac Hamilton then formulated his equations to describe the dynamics of the system as :\fracp(t) = -\frac\mathcal :\fracq(t) =~~\frac\mathcal The Hamiltonian of control theory describes not the ''dynamics'' of a system but conditions for extremizing some scalar function thereof (the Lagrangian) with respect to a control variable u. As normally defined, it is a function of 4 variables :H(q,u,p,t)= \langle p,\dot \rangle -L(q,u,t) where q is the state variable and u is the control variable with respect to that which we are extremizing. The associated conditions for a maximum are :\frac = -\frac :\frac = ~~\frac :\frac = 0 This definition agrees with that given by the article by Sussmann and Willems. (see p. 39, equation 14). Sussmann and Willems show how the control Hamiltonian can be used in dynamics e.g. for the
brachistochrone problem In physics and mathematics, a brachistochrone curve (), or curve of fastest descent, is the one lying on the plane between a point ''A'' and a lower point ''B'', where ''B'' is not directly below ''A'', on which a bead slides frictionlessly under ...
, but do not mention the prior work of Carathéodory on this approach.


Current value and present value Hamiltonian

In
economics Economics () is the social science that studies the Production (economics), production, distribution (economics), distribution, and Consumption (economics), consumption of goods and services. Economics focuses on the behaviour and intera ...
, the objective function in dynamic optimization problems often depends directly on time only through
exponential discounting In economics exponential discounting is a specific form of the discount function, used in the analysis of choice over time (with or without uncertainty). Formally, exponential discounting occurs when total utility is given by :U(\_^)=\sum_^\del ...
, such that it takes the form :I(\mathbf(t),\mathbf(t),t) = e^ \nu(\mathbf(t),\mathbf(t)) where \nu(\mathbf(t),\mathbf(t)) is referred to as the instantaneous
utility function As a topic of economics, utility is used to model worth or value. Its usage has evolved significantly over time. The term was introduced initially as a measure of pleasure or happiness as part of the theory of utilitarianism by moral philosopher ...
, or
felicity function Felicity may refer to: Places * Felicity, California, United States, an unincorporated community * Felicity, Ohio, United States, a village * Felicity, Trinidad and Tobago, a community in Chaguanas Entertainment * ''Felicity'' (TV series), ...
. This allows a redefinition of the Hamiltonian as H(\mathbf(t),\mathbf(t),\mathbf(t),t) = e^ \bar(\mathbf(t),\mathbf(t),\mathbf(t)) where :\begin \bar(\mathbf(t),\mathbf(t),\mathbf(t)) \equiv& \, e^ \left I(\mathbf(t),\mathbf(t),t) + \mathbf^(t) \mathbf(\mathbf(t),\mathbf(t),t) \right\\ =& \, \nu(\mathbf(t),\mathbf(t),t) + \mathbf^(t) \mathbf(\mathbf(t),\mathbf(t),t) \end which is referred to as the current value Hamiltonian, in contrast to the present value Hamiltonian H(\mathbf(t),\mathbf(t),\mathbf(t),t) defined in the first section. Most notably the costate variables are redefined as \mathbf(t) = e^ \mathbf(t), which leads to modified first-order conditions. :\frac = 0, :\frac = - \dot(t) + \rho \mathbf(t) which follows immediately from the
product rule In calculus, the product rule (or Leibniz rule or Leibniz product rule) is a formula used to find the derivatives of products of two or more functions. For two functions, it may be stated in Lagrange's notation as (u \cdot v)' = u ' \cdot v + ...
. Economically, \mathbf(t) represent current-valued
shadow price A shadow price is the monetary value assigned to an abstract or intangible commodity which is not traded in the marketplace. This often takes the form of an externality. Shadow prices are also known as the recalculation of known market prices in o ...
s for the capital goods \mathbf(t).


Example: Ramsey–Cass–Koopmans model

In
economics Economics () is the social science that studies the Production (economics), production, distribution (economics), distribution, and Consumption (economics), consumption of goods and services. Economics focuses on the behaviour and intera ...
, the
Ramsey–Cass–Koopmans model The Ramsey–Cass–Koopmans model, or Ramsey growth model, is a neoclassical model of economic growth based primarily on the work of Frank P. Ramsey, with significant extensions by David Cass and Tjalling Koopmans. The Ramsey–Cass–Koopmans mo ...
is used to determine an optimal savings behavior for an economy. The objective function J(c) is the
social welfare function In welfare economics, a social welfare function is a function that ranks social states (alternative complete descriptions of the society) as less desirable, more desirable, or indifferent for every possible pair of social states. Inputs of the fu ...
, :J(c) = \int^T_0 e^u(c(t)) dt to be maximized by choice of an optimal consumption path c(t). The function u(c(t)) indicates the
utility As a topic of economics, utility is used to model worth or value. Its usage has evolved significantly over time. The term was introduced initially as a measure of pleasure or happiness as part of the theory of utilitarianism by moral philosopher ...
the
representative agent Economists use the term representative agent to refer to the typical decision-maker of a certain type (for example, the typical consumer, or the typical firm). More technically, an economic model is said to have a representative agent if all agen ...
of consuming c at any given point in time. The factor e^ represents
discounting Discounting is a financial mechanism in which a debtor obtains the right to delay payments to a creditor, for a defined period of time, in exchange for a charge or fee.See "Time Value", "Discount", "Discount Yield", "Compound Interest", "Efficient ...
. The maximization problem is subject to the following differential equation for
capital intensity Capital intensity is the amount of fixed or real capital present in relation to other factors of production, especially labor. At the level of either a production process or the aggregate economy, it may be estimated by the capital to labor ratio, ...
, describing the time evolution of capital per effective worker: :\dot=\frac =f(k(t)) - (n + \delta)k(t) - c(t) where c(t) is period t consumption, k(t) is period t capital per worker (with k(0) = k_ > 0), f(k(t)) is period t production, n is the population growth rate, \delta is the capital depreciation rate, the agent discounts future utility at rate \rho, with u'>0 and u''<0. Here, k(t) is the state variable which evolves according to the above equation, and c(t) is the control variable. The Hamiltonian becomes :H(k,c,\mu,t)=e^u(c(t))+\mu(t)\dot=e^u(c(t))+\mu(t) (k(t)) - (n + \delta)k(t) - c(t)/math> The optimality conditions are :\frac=0 \Rightarrow e^u'(c)=\mu(t) :\frac=-\frac=-\dot \Rightarrow \mu(t) '(k)-(n+\delta)-\dot in addition to the transversality condition \mu(T)k(T)=0. If we let u(c)=\log(c), then log-differentiating the first optimality condition with respect to t yields :-\rho-\frac=\frac Inserting this equation into the second optimality condition yields :\rho+\frac=f'(k)-(n+\delta) which is known as the
Keynes–Ramsey rule In macroeconomics, the Keynes–Ramsey rule is a necessary condition for the optimality of intertemporal consumption choice. Usually it is express as a differential equation relating the rate of change of consumption with interest rates, time prefe ...
, which gives a condition for consumption in every period which, if followed, ensures maximum lifetime utility.


References


Further reading

* * * {{DEFAULTSORT:Hamiltonian (Control Theory) Optimal control